package com.project.psc.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 供货单实体
 */
@Data
@TableName("t_supply")
public class SupplyBean {

    /**
     * 供货单实体id
     */
    @TableId(value = "pk_id", type = IdType.AUTO)
    private Long id;

    /**
     * 供货批次
     */
    @TableField("s_batch")
    private String batch;


    /**
     * 订单编号
     */
    @TableField("s_orderId")
    private String orderId;

    /**
     * 供应商id
     */
    @TableField("fk_supplierId")
    private Long supplierId;

    /**
     * 供应商名称
     */
    @TableField("s_supplierName")
    private String supplierName;

    /**
     * 状态（未发货：0；已发货：1；已完成：2）
     */
    @TableField("s_status")
    private Integer status = 1;

    /**
     * 发货时间
     */
    @TableField("s_time")
    private LocalDateTime time = LocalDateTime.now();

    /**
     * 发货地址
     */
    @TableField("s_address")
    private String address;

    @TableField("s_pact")
    private String pact;

    /**
     * 供货商品集合
     */
    @TableField(exist = false)
    private List<GoodsBean> goodsList;

    @TableField("s_sumPrice")
    private Double sumPrice;
}
